package com.cattsoft.qr.report.reportinfo;


public class AuthTableInfo
{
	public AuthTableInfo(String tableName, String columnName)
	{
		this.tableName = tableName;
		this.columnName = columnName;
	}
	
	public String getTableName()
	{
		return this.tableName;
	}

	public String getColumnName()
	{
		return this.columnName;
	}

	public boolean equals(Object obj)
	{
		if (this == obj)
		{
			return true;
		}
		
		if (obj instanceof AuthTableInfo)
		{
			AuthTableInfo other = (AuthTableInfo) obj;
			String otherTableName = other.getTableName();
			String otherColumnName = other.getColumnName();
			
			if (null == this.tableName)
			{
				if (null != otherTableName)
				{
					return false;
				}
			}
			else
			{
				if (!this.tableName.equals(otherTableName))
				{
					return false;
				}
			}
			
			if (null == this.columnName)
			{
				if (null != otherColumnName)
				{
					return false;
				}				
			}
			else
			{
				if (!this.columnName.equals(otherColumnName))
				{
					return false;
				}				
			}
			
			return true;
		}

		return false;
	}	
	
	private String tableName;
	private String columnName;
}
